Texture mapping is a process for mapping an image onto a surface of a graphical object to enhance the visual realism of a generated image. Intricate detail at the surface of an object is very difficult to model using polygons or other geometric primitives, and doing so can greatly increase the computational cost of the object texture mapping is a more efficient way to represent fine detail on the surface of an object. A "texture map" is a digital image, which we will also refer to as the "source image." The texture map is typically rectangular in shape and has its own (u, v) coordinate space. Individual elements of the texture map are referred to as "texels." In a texture mapping operation, a texture or "source image" is mapped to the surface of a graphical model as the model is rendered to create a target image.
As digital images, the source and the target images are sampled at discrete points, usually on a grid of points with integer coordinates. In the source image, texels are located at integer coordinates in the (u,v) coordinate system. Similarly, in the target image, pixels are located at integer coordinates in the (x,y) coordinate system.
The process of texture mapping generally includes sampling data from the source image to compute an intensity value for a pixel in the destination image. The texels to be sampled for a given pixel are typically identified by mapping a point in the destination image into the source image. Texels neighboring the mapped point in the source image are then sampled, weighted and summed to compute the intensity value for a pixel. This process is then repeated for additional pixels in the destination image.
While texture mapping is an effective technique for generating images with surface detail, present approaches often produce unacceptable amounts of distortion. Distortion results because, in practice, several approximations are made in computing pixel intensities. In real time graphics systems, the problem is particularly acute because each pixel value must be computed quickly so that the entire image can be generated within a fixed time period. Because of these rigorous timing constraints, real time systems either do not support texture mapping or make additional approximations that reduce image quality.
To simplify texture mapping operations, some systems make approximations in determining the shape of a sampling region in the source image. The sampling region is the area in the source image that defines which texels to sample in computing a pixel intensity, and is sometimes referred to as the filter footprint. The footprint will have a different shape in the source for each target point. Since the footprint can vary for each point, it is difficult to find the correct shape of the footprint and the weighting factors to apply to the points inside the footprint. Some systems make the approximation of using the same shape for the filter at every point, although they may allow the size of the filter to vary. This approach often leads to artifacts in the final image that degrade image quality.
Filters that produce either square or circular footprints of variable size are referred to as isotropic filters. A circle is truly isotropic since it has the same length in all directions. A square is essentially isotropic, since it has equal dimension horizontally and vertically.
Isotropic filtering can produce distortion because the same filter shape is used regardless of the extent to which the mapping is non-linear from destination to source image. In areas of the source image where the actual footprint is highly elongated, an essentially isotropic shape such as a square or a circle is a poor substitute for the footprint, even if the size is adjustable. Since an isotropic filter only has one shape, it can not accurately capture texels in an elongated footprint. For example, a square filter cannot accurately sample texel values from a quadrilateral footprint elongated in one direction. Sampling texels outside the actual footprint can cause blurring. Not sampling texels in the footprint, on the other hand, can cause the final image to sparkle due to aliasing.
In one approach called MIP (multum in parvo--many things in a small place) mapping, a number of texture maps are stored at different resolutions. For example, if the one texture is at 512.times.512 texels, textures at 256.times.256, 128.times.128, 64.times.64, etc. can also be stored. This "pyramid" of texture maps at varying resolution can be used to find the best fit for an isotropic filter on the footprint of the pixel mapped into the texture. The process begins by finding the two textures where the footprint is closest in size to the size of the filter. It then performs interpolation for the two textures that fit the footprint most closely to compute two intermediate values. Finally, it interpolates between the two intermediate values to find a value for the pixel.
While MIP mapping can provide improved results for isotropic filters, it produces artifacts where the filter footprint in the source image is contracted or elongated in one direction. This contraction or elongation can produce a high degree of anisotropy of a filter. For instance, if the transformation contracts the image in one direction much more than in another direction, then the inverse transformation will expand or elongate the footprint in the source along the direction of maximum contraction in the target. This can occur when viewing a planar surface from a perspective close to the edge. Using an isotropic filter, the final image appears distorted in this example because the filter cannot properly sample texel values in the elongated footprint.